package exception;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseDemo {
    public static void main(String[] args) {
        try (FileOutputStream fos=new FileOutputStream("./autoClose");){
            fos.write(1);
        } catch (IOException e) {
            throw new RuntimeException("error");
        }

    }
}
